import { createApp } from 'vue';
import './styles/index.less';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import App from './App.vue';
import router from '@/router/index.js';
import { createPinia } from 'pinia';
// 自适应
import '@/utils/rem.js';
// 注册图标
import { registerIcons } from '@/utils/registerIcon';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

const pinia = createPinia();
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// 注册图标
app.use(registerIcons);
app.use(ElementPlus);
app.use(router);
app.use(pinia);
app.mount('#app');
